import React from "react" 
import "./style.less"

export default class HotSearchList extends React.Component{

    changeDistry(distryName){
        this.props.history.push('/currentpage/'+(distryName));
    }

    render (){
        let distry = ['回龙观','望京','宋家庄','百子湾','天通苑','芍药居','立水桥','常营','来广营','公寓'];
        return (
            <div> 
                <div className="hotsearch-list-container">
                    <h3>热门搜索</h3>
                    <ul className="hotsearch-distry-name clear">
                        {
                            distry.map((ele,index) => {
                                return <li key={index} onClick={this.changeDistry.bind(this,ele)}>{ele}</li>
                            })
                        }
                    </ul>
                    
                </div>
                <div className="search-record">
                    <h2>历史搜索</h2>
                    <div>清除搜索记录</div>
                </div>
                
            </div>
        )
    }
}

